<template>
  <div>
    <div class="news">
      <div class="title">
        <p :style="`color:${nameColor}`">{{ name }}</p>
        <div class="mydivider">
          <span class="before" :style=" `background-color: ${background};`"></span>
          <span class="eng" :style="`color:${EngNameColor}`">{{
            EngName
          }}</span>
          <span class="affter" :style=" `background-color: ${background};`"></span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["name", "EngName", "nameColor", "EngNameColor","background"],
};
</script>

<style lang="scss" scoped>
// 自定义标题分割线
.title {
  margin: 0 auto;
  margin-bottom: 30px;
  text-align: center;
  p {
    font-size: 24px;
    color: #333;
  }
  .mydivider {
    display: flex;
    justify-content: center;
    align-items: center;
    .before,
    .affter {
      width: 80px;
      height: 2px;
      background-color: var(--color-zdyblue);
    }

    .eng {
      padding: 0 10px;
      font-size: 18px;
      color: var(--color-zdyblue);
     
    }
  }
}
</style>